package DAO;

import java.util.List;

import model.impl.Passenger;
import model.impl.Train;

/**
 *  TrainDAO interface, extend GenericDAO interface using as parameters
 *  entity of Train and Integer class as an ID. It also adds some specific 
 *  to Train entity methods
 */
public interface TrainDAO extends GenericDAO<Train, Integer> {
	
	/**
	 * Checks given train and looks for all passengers that have tickets on
	 * it.
	 * 
	 * @param  train - Train entity where to look for passengers
	 * @return       - List of passengers on the given train or null if there 
	 * 				   is no passengers on train
	 */
	public List<Passenger> getAllPassangersOnTheTrain(Train train);
	
	/**
	 * Looks for train with the instance Train.trainNumber equals to the
	 * given trainNumber parameter.
	 * 
	 * @param trainNumber - an Integer representing the Train.trainNumber 
	 * 						of the required train
	 * @return 			  - Train entity object or null if such object was
	 * 						not found
	 */
	public Train findTrainByTrainNumber(Integer trainNumber);
}
